package com.kning.mastermind;

import java.util.Objects;

/**
 * AvgReducetion
 *
 * @author ning
 **/
public class AvgReducetion implements Comparable{
    private Element4b element4b;
    private Integer averageReduction;


    public AvgReducetion(Element4b element4b, Integer averageReduction) {
        this.element4b = element4b;
        this.averageReduction = averageReduction;
    }

    @Override
    public int compareTo(Object o) {
        return 0;
    }

    public Element4b getElement4b() {
        return element4b;
    }

    public void setElement4b(Element4b element4b) {
        this.element4b = element4b;
    }

    public Integer getAverageReduction() {
        return averageReduction;
    }

    public void setAverageReduction(Integer averageReduction) {
        this.averageReduction = averageReduction;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AvgReducetion that = (AvgReducetion) o;
        return Objects.equals(element4b, that.element4b) && Objects.equals(averageReduction, that.averageReduction);
    }

    @Override
    public int hashCode() {
        return Objects.hash(element4b, averageReduction);
    }

    @Override
    public String toString() {
        return "AvgReducetion{" +
                "element4b=" + element4b +
                ", averageReduction=" + averageReduction +
                '}';
    }
}
